<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
    	<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>众筹管理后台</title>
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/dashboard.css" />
	</head>
	<body>
		
	<nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">众筹管理平台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
        	
          <ul class="nav navbar-nav navbar-right">
          	<li><a href="index.jsp">首页</a></li>
        <li><a href="admin_userinfo.jsp">欢迎, 张三</a></li>
            <li><a href="update_userinfo.jsp" title="修改个人资料和密码的页面">设置</a></li>
            <li><a href="#" title="退出登录">退出</a></li>
          </ul>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
        	<ul class="nav nav-sidebar">
            <li ><a href="index.jsp">首页</a></li>
           </ul>
          <ul class="nav nav-sidebar">
            <li><a href="products.jsp">所有项目</a></li>
            <li><a href="auditing.jsp">项目审核</a></li>
            <li><a href="following.jsp">项目跟踪</a></li>
 		    <li><a href="comments.jsp">项目评论</a></li>
            <li><a href="classify.jsp">项目分类</a></li>
            <li><a href="recommend.jsp">项目推荐</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="user_register.jsp">注册用户</a></li>
            <li><a href="user_bankroll.jsp">用户资金</a></li>
            <li><a href="user_log.jsp">用户日志</a></li>
            <li><a href="user_audit.jsp">实名审核</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="news_management.jsp">新闻管理</a></li>
            <li class="active"><a href="problem_management.jsp">问题管理</a></li>
            <li><a href="user_management.jsp">管理用户</a></li>
            <li><a href="log_management.jsp">管理日志</a></li>
          </ul>
        </div>
        
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="container"  id="HEAGER">
		<!-- 标题 -->
		<div class="row" style="float: left;width:70%">
			<div>
				<div class="page-header" >
					<h1>常见问题</h1>
					<h5 id="getTime"></h5>
				</div>
				<!-- 显示表格数据-->
				<div class="row" id="FQA">
					<div class="col-md-12">
						<h2>项目QA</h2>
						<table class="table table-hover" id="questionAll_table">
							<tbody>

							</tbody>
						</table>
					</div>
				</div>
				<!-- 显示表格数据-->
				<div class="row" id="XIN">
					<div class="col-md-12">
						<h2>最新发布</h2>
						<table class="table table-hover" id="questionOtherD_table">
							<tbody>

							</tbody>
						</table>
					</div>
				</div>

				<!-- 显示表格数据-->
				<div class="row" id="WEN">
					<div class="col-md-12">
						<h2>相关文档</h2>
						<table class="table table-hover" id="questionOther_table">
							<tbody>

							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		
		<div style="float: left;position:fixed; left:80%;top:200px">
			<!--导航 -->
			<ul class="nav nav-pills nav-stacked">
				<li role="presentation" class="active"><a>本页目录</a></li>
				<li role="presentation"><a href="#HEAGER">快速查询</a></li>
				<li role="presentation"><a href="#FQA">项目FQA</a></li>
				<li role="presentation"><a href="#XIN">最新发布</a></li>
				<li role="presentation"><a href="#WEN">相关文档</a></li>
			</ul>
		</div>

	</div>
	
      
        </div>
      </div>
    </div>
		
		<script type="text/javascript" src="js/jquery1.12.4.min.js" ></script>
		<script type="text/javascript" src="js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="js/countUp.js" ></script>
		<script>
			$(document).ready(function() {
				
			});
			function getTime() {
				var Week, Weekday;
				var date = new Date();
				Week = [ "星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" ];
				Weekday = date.getDay();
				year = date.getFullYear();
				month = date.getMonth() + 1;
				day = date.getDate();
				hours = date.getHours();
				minutes = date.getMinutes();
				seconds = date.getSeconds();
				document.getElementById("getTime").innerHTML = "当前时间：" + year + "年"+ month + "月" + day + "日" + "\t" + hours + ":" + minutes + ":"+ seconds + "\t" + Week[Weekday];
			};
			setInterval("getTime()", 1000);
			
			//页面加载完毕后，发送ajax请求
			
			$(function() {
				$.ajax({
					url : "/crowd_funding/getAllQuestionAll",
					data : "pn=1",
					type : "GET",
					success : function(result1) {
						build_questionAll_table(result1);
					}
				});
			})
			function build_questionAll_table(result1) {
				//清空表格
				$("#questionAll_table tbody").empty();
				var questionAll = result1.extend.pageInfo.list;
				$.each(questionAll, function(index, item) {
					var questionNameTd = $("<li></li>").append(
							$("<a></a>").append(item.questionName).attr("href", "question/question_list.jsp#Q"+item.questionId));
					$("<ul></ul>").append(questionNameTd).appendTo(
							"#questionAll_table tbody");
				});
			}

			$(function() {
				$.ajax({
					url : "/crowd_funding/getAllQuestionOther",
					data : "pn=1",
					type : "GET",
					success : function(result2) {
						build_questionOther_table(result2);
					}
				});
			})
			function build_questionOther_table(result2) {
				//清空表格
				$("#questionOther_table tbody").empty();
				var questionOther = result2.extend.pageInfo.list;
				$.each(questionOther, function(index, item) {
					var questionotherNameTd = $("<li></li>").append(
							$("<a></a>").append(item.questionotherName).attr("href", "question/question_list.jsp#Q"+item.questionId));
					$("<ul></ul>").append(questionotherNameTd).appendTo("#questionOther_table tbody");
				});
			}

			$(function() {
				$.ajax({
					url : "/crowd_funding/getAllQuestionOtherTime",
					data : "pn=1",
					type : "GET",
					success : function(result3) {
						build_questionOtherD_table(result3);
					}
				});
			})
			function build_questionOtherD_table(result3) {
				//清空表格
				$("#questionOtherD_table tbody").empty();
				var questionOtherD = result3.extend.pageInfo.list;
				$.each(questionOtherD, function(index, item) {
					var questionotherNameTd = $("<li></li>").append(
							$("<a></a>").append(item.questionotherName).attr("href", "question/question_list.jsp#Q"+item.questionId));
					$("<ul></ul>").append(questionotherNameTd).appendTo("#questionOtherD_table tbody");
				});
			}
		</script>
	</body>
</html>